package com.xunlai.infra.permission.manager.authority.login;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * @author liang
 * @date 9/3/23 3:52 PM
 */
public class CaptchaUsernamePasswordAuthenticationToken extends UsernamePasswordAuthenticationToken {

    private final String captcha;

    public CaptchaUsernamePasswordAuthenticationToken(String captcha,Object principal, Object credentials) {
        super(principal, credentials);
        this.captcha = captcha;
    }

    public CaptchaUsernamePasswordAuthenticationToken(String captcha,Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
        super(principal, credentials, authorities);
        this.captcha = captcha;
    }

    public String getCaptcha() {
        return captcha;
    }
}
